package pickbook.controller;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import pickbook.model.UnivService;

//지역, 대학교 관련 컨트롤러
@Controller
public class UnivController {
	@Resource(name="univServiceImpl")
	private UnivService univService;
	
	/**
	 * method : getUnivListByLocation
	 * comment : 지역 정보 내에 있는 대학 목록을 반환
	 * @param location
	 * @return
	 * @throws Exception
	 * 
	 * @author 김병각
	 * @date 2014-07-02
	 */
	@RequestMapping("univSelect.do")
	@ResponseBody
	public List getUnivListByLocation(String location) throws Exception{
		
		List univListByLocation=univService.getUnivListByLocation(location);//지역정보에 따른 대학 목록 반환
		
		return univListByLocation;
	}
	
}
